<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>LearnHttpClient</title>
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/vue/vue.min.js"></script>


</head>
<body>
<div id="app">
    <form>
        url:<input type="text" id="url" name="url" placeholder="请输入网址" value="http://www.shicimingju.com/chaxun/list/4059.html"><br>
        <input type="submit" id="spacer1">
        <div v-html="msg"></div>

    </form>
</div>

</body>
<script>
    function getUrl() {
        return $("#url").val();
    }
    var vue = new Vue({
        el: "#app",
        data: {
            msg: ""
        },

        mounted: function () {
            var url = "http://www.shicimingju.com/chaxun/list/4059.html";
            var _this = this;
            $.get("http://localhost:8080/0204learnhttpclient/getContent", {url: url}, function (data) {
                if (data.data) {
                    _this.msg = data.data;
                } else {
                    _this.msg = "无内容";
                }
            });
        },
    });
</script>
</html>